﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Payroll.BusinessLogic.Package;
using Payroll.BusinessLogic;
using Payroll.Common.Utils;
using Payroll.BusinessLogic.CustomerManager;
using PayrollHR.Web;
namespace PayrollHR.Administration.Modules
{
    public partial class PackagePriceSearch : BasePayrollAdministrationUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int UserId = PayrollContext.Current.Session.EmployeeId;
                hfdUserId.Value = CommonHelper.ToString(UserId);
            }
        }
        public PackageSearch GetPackageSearch()
        {
            DateTime? date = dpFromdate.SelectedDate;
            var item = new PackageSearch
            {
                UserId = CommonHelper.ToInteger(hfdUserId.Value),             
                PackName = txttengoi.Text.Trim().Length > 0 ? txttengoi.Text.Trim() : null,
                PriceDate = date
            };
            return item;
        }
    }
}